<@override name="title">用户管理</@override>

<@override name="styles">
<link href="${ctx}/static/plugins/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
</@override>


<@override name="header">
<h4>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-map-marker"></i>&nbsp;&nbsp; 系统设置</a></li>
        <li><a href="#">用户管理</a></li>
    </ol>
</h4>
</@override>

<@override name="content">
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header with-border" style="padding-bottom:0;">
                <div class="col-lg-9">
                    <form class="form-horizontal" action="#" role="form" id="search-form">
                        <div class="form-group ">
                            <label class="col-sm-2 control-label text-left" style="width:10%;">账号:</label>
                            <div class="col-sm-3">
                                <input type="text" name="f-u.username-LIKE" class="form-control">
                            </div>
                            <label class="col-sm-2 control-label text-left" style="width:10%;">姓名:</label>
                            <div class="col-sm-3">
                                <input type="text" name="f-u.real_name-LIKE" class="form-control">
                            </div>
                            <div class="col-sm-2">
                                <input type="button" id="search" value="查询" class="btn btn-primary">
                            </div>
                        </div>
                    </form>
                </div>
                <a class="btn btn-default pull-right" href="${ctx}/system/user/item/0">
                    <i class="fa fa-plus"></i> 新建
                </a>
            </div>
            <div class="box-body">
                <table id="data-table" class="table table-bordered table-hover">
                    <thead>
                        <tr>
                            <th></th>
                            <th>账号</th>
                            <th>姓名</th>
                            <th>出生日期</th>
                            <th>状态</th>
                            <th>所属角色</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div><!-- /.box -->
    </div><!-- /.col -->
</div><!-- /.row -->


<script id="data-table-action" type="text/x-handlebars-template">
    {{#if status}}
    <a class="btn btn-danger dt-ajax" data-href="${ctx!}/system/user/status/{{id}}/0">禁用</a>
    {{else}}
    <a class="btn btn-success dt-ajax" data-href="${ctx!}/system/user/status/{{id}}/1">启用</a>
    {{/if}}
    <a class="btn btn-info" href="${ctx!}/system/user/item/{{id}}">编辑</a>
    <a class="btn btn-warning dt-ajax" data-href="${ctx!}/system/user/delete/{{id}}">删除</a>
</script>

<script id="status-template" type="text/x-handlebars-template">
    {{#if status}}
    <span class="text-success">启用</span>
    {{else}}
    <span class="text-danger">禁用</span>
    {{/if}}
</script>

</@override>

<@override name="scripts">
<!-- DATA TABES SCRIPT -->
<script src="${ctx}/static/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
<script src="${ctx}/static/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
<script src="${ctx}/static/plugins/datatables/datatables.js" type="text/javascript"></script>

<script type="text/javascript" src="${ctx}/static/views/system/user/index.js"></script>
</@override>

<@extends name="/WEB-INF/_basic/main.ftl"/>